﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JTicket.UI
{
    public partial class JT_DrawSubArea : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断是否已创建座位信息。
            if (Request.QueryString["ID"] != null)
            {
                string ex = DAL.D_Area.GetEx(Request.QueryString["ID"].ToString(),
                    Request.QueryString["ThCode"].ToString()); 
                if (ex.Equals("0"))
                    Common.JsMsg.Alert("此分区还未创建座位图,请创建座位图。");
                JTicket.Model.D_Area area = new JTicket.Model.D_Area();
                BLL.D_Area bllArea = new BLL.D_Area();
                area = bllArea.GetModel(Request.QueryString["ID"].ToString());
                subcode.Value = area.AreaCode;
                subname.Value = area.AreaName;
                cows.Value = area.ex;
                rows.Value = area.ey;
            }
            if (!string.IsNullOrEmpty(Request.QueryString["ThCode"]))
                ScriptManager.RegisterStartupScript(
                     this, typeof(Page), "ThCode", string.Format("var ThCode='{0}';var SCode='{1}';", Request.QueryString["ThCode"].ToString(), Request.QueryString["ID"].ToString()), true);

        }
    }
}